<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<script src="plug-in/raty/jquery.raty.min.js"></script>
 
<t:formvalid formid="formobj" dialog="true"  layout="table"   
	tiptype="3" action="teachExpScoreController.do?doUpdate" beforeSubmit="validateScore">
	<input type="hidden" name="id" value="${apply.id}" />
	<table cellpadding="0" cellspacing="1" class="formtable" style="margin-top:5px;"> 
	<tr>
	 		<td align="right">
					<label class="Validform_label">
							实验名称
					</label>
			</td>
			<td class="value">
				    ${apply.courseSchedule.teachItem.itemName} 
			</td>
		 </tr> 
		 <tr>
	 		<td align="right">
					<label class="Validform_label">
							实验时间
					</label>
			</td>
			<td class="value">
				 
				    <fmt:formatDate value="${apply.courseSchedule.courseDate }" pattern="yyyy-MM-dd"/>
			</td>
		 </tr> 
		 <tr>
	 		<td align="right">
					<label class="Validform_label">
							教师
					</label>
			</td>
			<td class="value">
				  ${apply.courseSchedule.teacher.realName}
			</td>
		 </tr> 
		<tr>
	 		<td align="right">
				<label class="Validform_label">
							评分
				</label>
			</td>
			<td class="value">
				 <div id="star"></div>
			</td>
		 </tr> 
		<tr>
	 		<td align="right">
					<label class="Validform_label">
							评价内容
					</label>
			</td>
			<td class="value">
				  <textarea name="content" maxlength="200" style="width:200px;height:80px;"></textarea>
			</td>
		 </tr> 
		 
	</table> 
	

</t:formvalid>

<script>
		$(document).ready(function(){
		    //初始化星星评论的插件
		    $.fn.raty.defaults.path = "plug-in/raty/img/";
		 	$.fn.raty.defaults.hints =  ['1', '2', '3', '4', '5'];
		 	
		 	$('#star').raty({score:5});
		});
		
		function validateScore(){
			var score = $('input[name="star"]').val();
			if(score == ''){
				tip('请选择分数');
				return false;
			}else{
				return true;
			}
		}
</script>